]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
weather: Prevent setting Geoclue source as location name
authorBrendan William <brendan.william@outlook.com>
Wed, 9 Aug 2023 17:40:35 +0000 (10:40 -0700)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 16 Aug 2023 19:17:21 +0000 (19:17 +0000)
Prior to Geoclue v2.7, the location description did not seem to ever be
set. Now, the source used to determine the location is set as the
description. This can result in the location name in dateMenu to be set
as "WiFi", "GeoIP", etc., since we relay the description as the location
name to GWeather. Instead, pass an empty string so GWeather continues
to set the location name itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2729>

js/misc/weather.js

index aba5fd5053d157aac29974c51ab90095b076c4ff..11fcdffbd4f966413c86a04747610644de5a0b42 100644 (file)
@@ -270,8 +270,8 @@ export class WeatherClient extends Signals.EventEmitter {
 
     _onGClueLocationChanged() {
         let geoLocation = this._gclueService.location;
-        let location = GWeather.Location.new_detached(
-            geoLocation.description,
+        // Provide empty name so GWeather sets location name
+        const location = GWeather.Location.new_detached('',
             null,
             geoLocation.latitude,
             geoLocation.longitude);